<!DOCTYPE html>
<html>
<head>
	<title>图片上传及预览</title>
	<style type="text/css">
		input[type='file']{
			border:1px solid #efefef;
		}		
	</style>
</head>
<body>
<div>
	<input type="file" name="picture">
	<img src="" id="picture">
	<script type="text/javascript">
		var pic=document.getElementById("picture");
		
	</script>
</div>
</body>
</html>